/**
 * 所有版权归 广西梧州 陈锦韬 所有
 *
 * @Title: AsyncTask
 * @Package com.rx.stock.service
 * @Description: 异步处理
 * @author: 陈锦韬
 * @date: 2021\9\11 0011
 * @version V1.0
 * @Copyright: 2021 陈锦韬  All rights reserved.
 */
package com.rx.stock.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author: Administrator
 * @Description: 异步处理
 * @date: 2021\9\11 0011
 */
@Service
@Slf4j
@Lazy
public class AsyncTask {
    @Autowired
    StockService stockService;

    @Async
    public void runAllHistory(){
        stockService.updateHistory();
    }
    @Async
    public void runLatest(){
        stockService.updateLatest();
    }
    @Async
    public void runMax(){
        stockService.calculateMax();
    }

    @Async
    public void getSzHistory(){
        stockService.updateSzHistory();
    }

    @Async
    public void getShHistory(){
        stockService.updateShHistory();
    }
}
